#!/bin/bash
HOST="localhost"
PORT="6000"
TEAM_NAME="Celtic"
BINARY="Celtic"
CLIENT="./$BINARY"
PLAYER_NUM=3

SLEEP_TIME=0.5

#make clean
qmake $BINARY.pro
make

PARAM="$TEAM_NAME $HOST $PORT"

#$CLIENT $PARAM "goalie" &

i=1
while [ $i -le $PLAYER_NUM ]; do
	echo ">>>> $TEAM_NAME Player: $i"
	$CLIENT $PARAM 0 > bla$i &
	sleep $SLEEP_TIME
	i=`expr $i + 1`
done
sleep 3

wait
